package org.tradeinterceptor.modular.strategy.initializer;

import java.util.ArrayList;
import java.util.List;
import java.util.Properties;

import org.tradeinterceptor.modular.strategy.Notifier;
import org.tradeinterceptor.modular.strategy.StrategyInitializer;
import org.tradeinterceptor.modular.strategy.StrategyModule;
import org.tradeinterceptor.modular.strategy.modules.AdxStrategyModule;
import org.tradeinterceptor.modular.strategy.modules.HeikinAshiStrategyModule;
import org.tradeinterceptor.modular.strategy.modules.MacdStrategyModule;
import org.tradeinterceptor.modular.strategy.notifier.SendMailSSL;



public class CombinedStrategyInitializer implements StrategyInitializer{
	
	Properties properties;

	public List<StrategyModule> getModules(){
		List<StrategyModule> modules = new ArrayList<StrategyModule>();
		modules.add(new MacdStrategyModule(26,12,9));
		modules.add(new AdxStrategyModule(14));
		modules.add(new HeikinAshiStrategyModule());
		return modules;
	}
	
	public double getTakeProfit(){
		return 0.0500;
	}
	
	public double getTrailingStop(){
		return 0.0100;
	}
	
	@Override
	public double getModuleCloseRatio() {
		return 0.51;
	}
	
	@Override
	public double getModulesOpenRatio() {
		return 0.65;
	}

	@Override
	public Notifier getNotifier() {
		Notifier n = new SendMailSSL();
		n.setProperties(properties);
		return n;
	}
	
	@Override
	public void setProperties(Properties properties) {
		this.properties = properties;
	}
}
